/**
 * Created by Admin on 2018/1/22.
 */
define(function(require,exports,module){
    var ObligeePM = require("./obligeePM");
    var keyUrl = "",tpl="",exportUrl;
    var obligeeInTpl=require("./tpl/obligeeInTpl.html");
    var patExpiryTpl= require("./tpl/patExpiryTpl.html");
    var failPatTpl= require("./tpl/failPatTpl.html");
    require("../common/qy-template");
    require("../seajs-init");

    switch( $(".ptmt-collction-t-u-select").children("a").html() || $(".nav-title").html()){
        case "专利权转入":
                keyUrl = window.jkconfig.webapiurlv + "applychange/inlist";
                tpl = obligeeInTpl;
                exportUrl =  window.jkconfig.webapiurlv + "applychangexport/inlist";
                break;
        case "专利权转出":
                keyUrl = window.jkconfig.webapiurlv + "applychange/outlist";
                tpl = obligeeInTpl;
                exportUrl =  window.jkconfig.webapiurlv + "applychangexport/outlist";
                break;
        case "届满通知":
                keyUrl =  window.jkconfig.webapiurlv + "expirynotice/list";
                tpl = patExpiryTpl;
                exportUrl =  window.jkconfig.webapiurlv + "expirynotice/listexport";
                break;
        case "失效分析":
                keyUrl = window.jkconfig.webapiurlv + "invalidAnalysis/list";
                tpl = failPatTpl;
                exportUrl =  window.jkconfig.webapiurlv + "invalidAnalysis/listexport";
                break;
    }
    ObligeePM.init(keyUrl,exportUrl,tpl);
    ObligeePM.bindEvent(keyUrl,exportUrl,tpl);
})